#!/bin/sh

PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export GCONV_PATH=/opt/lib/gconv

case $1 in
	start)
	logger "Starting softether vpnbridge service."
	LANG=en_US.UTF-8 /opt/libexec/softethervpn/vpnbridge start
	;;
	stop)
	logger "Stopping softether vpnbridge service."
	LANG=en_US.UTF-8 /opt/libexec/softethervpn/vpnbridge stop
	;;
	restart)
	logger "Starting softether vpnbridge service."
	LANG=en_US.UTF-8 /opt/libexec/softethervpn/vpnbridge stop
	sleep 5
	logger "Stopping softether vpnbridge service."
	LANG=en_US.UTF-8 /opt/libexec/softethervpn/vpnbridge start
	;;
	*)
	echo "Usage: $0 {start|stop|restart}"
	;;
esac
